<!--{template header}-->
<script type="text/javascript">
function trim(str){
var re=/\s*(\S[^\0]*\S)\s*/;
re.exec(str);
return RegExp.$1;
}
function check()
{
var money = Math.round($('#money').val()*100)/100;
var maxmoney = {$info['paymoney']};
if (isNaN(money) || money <= 0)
{
Error('money','退款金额必须是一个有效数字！');
return false;
}
if (money > maxmoney)
{
Error('money','退款金额过大，您最大可退款金额为' + maxmoney + '元');
return false;
}
if (trim($('#reason').val()) == '')
{
Error('reason','请输入退款理由');
return false;
}
return true;
}
function Error(id,msg){$('#error_msg').html(msg);$('#'+id).focus();}
</script>
<div class="site-ms">
<div class="site-ms__left">
<div class="t_area_out">
<div class="t_area_in">
<p class="cur_title">退款申请</p>
<div class="sect">						
<div class="nleftL">
<form action="index.php?mod=refund&code=refundsave" method="post" onsubmit="return check();">
<input type="hidden" name="orderid" value="{$order_id}"/>
<div class="field">
<label>订单 ID：</label>
{$order_id}
</div>
<div class="field">
<label>产品名称：</label>
{$info['product']['flag']}
</div>
<div class="field">
<label>退款金额：</label>
<input type="text" id="money" name="money" value="" class="f_input input_h" style="width:150px;margin-right:5px;">元
<span id="status" class="hint" style="width:450px;">最大可退款金额:{$info['paymoney']}元
<!--{if $info['expressprice']}-->（含运费：{$info['expressprice']}元）<!--{/if}-->
<!--{if $info['tmsg']}--><br>【备注】订单总金额：{$info['tmsg']['money']}元，共<font color="green">{$info['tmsg']['tnum']}</font>张{TUANGOU_STR}券；您已消费<font color="red">{$info['tmsg']['num']}</font>张{TUANGOU_STR}券<!--{/if}-->
</span>
</div>
<div class="field">
<label>申请理由：</label>
<textarea id="reason" class="f_input input_h" style="width:286px" name="reason"></textarea>
</div>
<div class="actbtn">
<!--{if $info['paymoney'] > 0}-->
<input type="submit" id="submit" class="btn btn-primary" name='submit'  value="提交">
<!--{else}-->
<input type="button" class="btn btn-primary" value="免费产品不支持退款" disabled>
<!--{/if}-->
</div>
</form>
<div class="field"><p id="error_msg" style="color:red;margin-left:30px;"></p></div>
</div>
</div>
</div>
</div>
</div> 
<div class="site-ms__right">
</div>
</div>
<!--{template footer}-->